﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using TimelineNet.Library;
public partial class HotZones : System.Web.UI.Page {
    protected void Page_Load(object sender, EventArgs e) {
        if(!Page.IsPostBack) {
            TimelineNet.Library.Zone dayZone = new TimelineNet.Library.Zone(DateTime.Now.AddDays(-2), DateTime.Now, 10, TimelineNet.Library.Enums.TimelineDateTime.HOUR);

            HotZoneBand YEAR = new HotZoneBand(10, Enums.TimelineDateTime.YEAR, 100);
            HotZoneBand MONTH = new HotZoneBand(10, Enums.TimelineDateTime.MONTH, 100);
            HotZoneBand DAY = new HotZoneBand(80, Enums.TimelineDateTime.DAY, 100);           

            //do we show the event text or not?
            YEAR.ShowEventText = false;
            MONTH.ShowEventText = false;
            DAY.ShowEventText = true;

            //how much gap between each and height of each item on the band
            YEAR.TrackGap = new decimal(0.1);
            MONTH.TrackGap = new decimal(0.1);
            MONTH.TrackHeight = new decimal(0.2);
            YEAR.TrackHeight = new decimal(0.2);

            //should we highlight the current time range in the bands?
            YEAR.Highlight = true;
            MONTH.Highlight = true;
            DAY.Highlight = false;


            //
            YEAR.Overview = true;
            MONTH.Overview = true;

            MONTH.SynchWith = 0;
            YEAR.SynchWith = 0;
            this.Timeline1.Bands.Add(DAY);
            this.Timeline1.Bands.Add(MONTH);
            this.Timeline1.Bands.Add(YEAR);

            DAY.Zones.Add(dayZone);

        }
    }
}
